package service.impl;


import dao.UserDao;

import service.UserService;

public class UserServiceImpl implements UserService {

    private UserDao userDao;
//有参构造方法
    public UserServiceImpl(UserDao userDao) {
        this.userDao = userDao;
    }

    public UserServiceImpl() {
    }
    //依赖注入
    /*public void setUserDao(UserDao userDao) {
                this.userDao = userDao;
            }*/
    public void save() {
        userDao.save();
    }

    public void adduser() {
        userDao.add();
    }

    public void deleteuser() {
        userDao.delete();

    }

    public void updateuser() {
userDao.update();
    }

    public void queryAlluser() {
        userDao.queryAll();

    }
}
